{template 'common/header'}
<style>
.settings{
	display: none;
}
.item{
	padding: 10px;
	border: 1px solid gainsboro;
	margin: 5px;
	width: 330px;
   	display: inline-block;
	position: relative;
	text-align: center;
}
.item img{
	width: 100%;
}
.item input{
	margin-top: 10px;
	display: inline;
}
.item input[type=text]{
	width: 65%;
}
.item input[type=number]{
	width: 30%;
	margin-right: 2%;
}
.item span{
	position: absolute;
	right: 0;
	font-size: 25px;
	color: red;
}
.item span:hover{
	font-size: 30px;
	border: 1px solid gainsboro;
	border-radius: 5px;
	background: black;
	cursor: pointer;
}
.img_group p{
	text-align: center;
}
.help-block{
	color: red !important;
}
</style>
<ul class="nav nav-tabs" id="snav">
	<li class="active"><a>基础设置</a></li>
	<li><a>游戏设置</a></li>
	<li><a>审核设置</a></li>
	<li><a>界面设置</a></li>
	<li><a>颜色设置</a></li>
	<li><a>文字自定义设置</a></li>
	<li><a>广告设置</a></li>
	<li><a>购买挑战设置</a></li>
	<li><a>关注信息设置</a></li>
	<li><a>支付参数</a></li>
	<li><a>用户协议</a></li>
	<li><a>海报设置</a></li>
	<li><a>Redis设置</a></li>
</ul>
<script>
$('#snav li').click(function(){
	$('#snav li').removeClass('active');
	$(this).addClass('active');
	$('.settings').hide();
	$('.settings').eq($(this).index()).show();
});

function randomString(len) {
　　len = len || 32;
　　var $chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678';    /****默认去掉了容易混淆的字符oOLl,9gq,Vv,Uu,I1****/
　　var maxPos = $chars.length;
　　var pwd = '';
　　for (i = 0; i < len; i++) {
　　　　pwd += $chars.charAt(Math.floor(Math.random() * maxPos));
　　}
　　return pwd;
}
</script>
<form action="" method="post" class="form-horizontal form">
<div class="settings" style="display:block;">
	<div class="panel panel-default">
	 	<div class="panel-heading">基础设置</div>
	 	<div class="panel-body">
	 		<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">版本状态</label>
				<div class="col-sm-9">
					<label><input type="radio" name="isnew" {if empty($settings['isnew'])}checked="checked"{/if} value="0"> 旧版小程序</label>
					<label style="margin-left: 10px;"><input type="radio" name="isnew" {if $settings['isnew']==1}checked="checked"{/if} value="1"> 已发布新版小程序</label>
				</div>
			</div>
	 		<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">程序标题</label>
            	<div class="col-sm-9">
                	<input class='form-control' name='base[title]' value='{$settings["base"]["title"]}' placeholder="程序标题，如：智力挑战">
            	</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">每日初始挑战次数</label>
            	<div class="col-sm-9">
                	<div class='input-group'>
	                	<input type="number" class='form-control' name='base[initnum]' value='{$settings["base"]["initnum"]}' />
	            		<span class='input-group-addon'>次</span>
            		</div>
            	</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">排行榜显示人数</label>
            	<div class="col-sm-9">
            		<div class='input-group'>
	                	<input type="number" class='form-control' name='base[rank]' value='{if !empty($settings["base"]["rank"])}{$settings["base"]["rank"]}{else}5{/if}' />
	            		<span class='input-group-addon'>人</span>
            		</div>
            	</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">毅力榜每页显示人数</label>
            	<div class="col-sm-9">
	                <div class='input-group'>	
	                	<input type="number" class='form-control' name='base[guts]' value='{if !empty($settings["base"]["guts"])}{$settings["base"]["guts"]}{else}5{/if}' />
	            		<span class='input-group-addon'>人</span>
            		</div>
            	</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">邮费</label>
            	<div class="col-sm-9">
	                <div class='input-group'>	
	                	<input type="text" class='form-control' name='base[express_fee]' value='{$settings["base"]["express_fee"]}' />
	            		<span class='input-group-addon'>元</span>
            		</div>
            	</div>
          	</div>
          	<div class="form-group">
			    <label class="col-xs-12 col-sm-3 col-md-2 control-label">分享奖励</label>
			    <div class="col-sm-9 col-xs-12">
			    	<div class='input-group'>
			    		<span class='input-group-addon'>分享一次送</span>
			    		<input type="number" name="get_share_num" value="{$settings['get_share_num']}" class="form-control"/>
						<span class='input-group-addon'>次机会  每天限</span>
                   		<input type="number" name="share_num" value="{$settings['share_num']}" class="form-control"/>
						<span class='input-group-addon'>次</span>
		            </div>
		            <div class="help-block">仅分享到群有效，每天一个群仅一次有效</div>
	            </div>
			</div>
	 		<div class="form-group">
			    <label class="col-xs-12 col-sm-3 col-md-2 control-label">好友点击奖励</label>
			    <div class="col-sm-9 col-xs-12">
			    	<div class='input-group'>
			    		<span class='input-group-addon'>好友点击一次送</span>
			    		<input type="number" name="get_click_num" value="{$settings['get_click_num']}" class="form-control"/>
						<span class='input-group-addon'>次机会  每天限</span>
                   		<input type="number" name="click_num" value="{$settings['click_num']}" class="form-control"/>
						<span class='input-group-addon'>次</span>
		            </div>
		            <div class="help-block">好友每天仅第一次点击有效</div>
	            </div>
			</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">中奖通知模板消息</label>
            	<div class="col-sm-9">
                	<input class='form-control' name='msgid' value='{$settings["msgid"]}'>
                	<div class='help-block'>小程序后台 点开模板消息，搜索 中奖结果通知 ，按顺序勾选 活动名称、奖品名称和中奖时间</div>
            	</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">游戏中音乐</label>
            	<div class="col-sm-9">
                	{php echo tpl_form_field_audio('music',$settings['music'])}
            	</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">游戏失败音乐</label>
            	<div class="col-sm-9">
                	{php echo tpl_form_field_audio('err_music',$settings['err_music'])}
            	<div class='help-block'>建议上传时长为3秒的音乐</div>
            	</div>
          	</div>
          	 <div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">剪贴板信息</label>
            	<div class="col-sm-9">
                	<input class='form-control' name='clipboard' value='{$settings["clipboard"]}'>
                	<div class='help-block'>进入小程序首页后，会自动复制 剪贴板信息；用途例如：支付宝红包口令，粉丝进入首页后自动复制，当他打开支付宝后，就会提示领取红包</div>
            	</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">安全秘钥</label>
            	<div class="col-sm-9">
            		<div class='input-group'>
                		<input class='form-control' name='junsiontoken' maxlength="10" value='{$settings["junsiontoken"]}'>
                		<div class='input-group-addon' onclick='$(this).prev().val(randomString(10))'>点击生成秘钥</div>
                	</div>
                	<div class='help-block'>安全秘钥，增加安全性；注意，每次修改安全秘钥都需要重新发布小程序，可能会影响运营中的小程序，谨慎修改；</div>
            	</div>
          	</div>
          	
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">首页滚动公告文字</label>
            	<div class="col-sm-9">
                	<input class='form-control' name='msg[txt]' value='{$settings["msg"]["txt"]}'>
                	<div class='help-block'>前端首页顶部滚动的广告文字</div>
            	</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">首页滚动公告速度</label>
            	<div class="col-sm-9">
                	<input class='form-control' name='msg[msgtime]' type="number" value='{$settings["msg"]["msgtime"]}'>
                	<div class='help-block'>前端首页顶部滚动的广告文字的速度（单位：秒）</div>
            	</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">首页滚动公告跳转appid</label>
            	<div class="col-sm-9">
                	<input class='form-control' name='msg[appid]' value='{$settings["msg"]["appid"]}'>
                	<div class='help-block'>客户点击滚动公告，跳转到指定小程序，该小程序必须关联同公众号</div>
            	</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">首页滚动公告跳转页面路径</label>
            	<div class="col-sm-9">
                	<input class='form-control' name='msg[path]' value='{$settings["msg"]["path"]}'>
                	<div class='help-block'>若广告是跳转小程序，则填写小程序页面地址</div>
                	<div class='help-block'>若广告是跳转网页，则填写网页链接，带上https，链接域名需登录小程序管理后台配置域名白名单</div>
            	</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">流量主代码</label>
            	<div class="col-sm-9">
                	<textarea class='form-control' name='advs'>{$settings["advs"]}</textarea>
                	<div class='help-block'>把小程序流量主广告位ID复制在这里；如果有多条，请换行； 广告将悬浮于底部</div>
            	</div>
          	</div>
        </div>
    </div>      	
</div>
<div class="settings">
	<div class="panel panel-default">
	 	<div class="panel-heading">【挑战智力】游戏设置<small style="color:red;">该游戏，用户开始了游戏才扣除用户一次挑战次数</small></div>
	 	<div class="panel-body">
	 		<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">状态</label>
				<div class="col-sm-9">
					<label><input type="radio" name="game_status[game0]" {if empty($settings['game_status']['game0'])}checked="checked"{/if} value="0"> 关闭</label>
					<label style="margin-left: 10px;"><input type="radio" name="game_status[game0]" {if $settings['game_status']['game0']==1}checked="checked"{/if} value="1"> 开启</label>
				</div>
			</div>
			<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">排序</label>
            	<div class="col-sm-9">
			    	<input type="number" name="sort[0]" value="{$settings['sort']['0']}" class="form-control"/>
		            <div class="help-block">值越大，排在越前</div>
            	</div>
          	</div>
	 		<div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">首页大图</label>
	            <div class="col-sm-9 col-xs-12">
	               	{php echo tpl_form_field_image('game[logo]',$settings['game']['logo']);}
	               	<div class="help-block">建议上传500*300大小的图片,不上传则使用系统默认</div>
	            </div>
	        </div>
	        <div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">键盘开始变换时间</label>
            	<div class="col-sm-9">
                	<div class='input-group'>
			    		<span class='input-group-addon'>游戏开始</span>
			    		<input type="number" name="game[change_time]" value="{$settings['game']['change_time']}" class="form-control"/>
						<span class='input-group-addon'>秒后开始更改键盘</span>
		            </div>
		            <div class="help-block">游戏开始达到设置的时间后，键盘将根据设置键盘变换时间来更改键盘顺序</div>
            	</div>
          	</div>
	        <div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">键盘变换时间</label>
            	<div class="col-sm-9">
                	<div class='input-group'>
			    		<span class='input-group-addon'>最短时间</span>
			    		<input type="number" name="game[min_time]" value="{$settings['game']['min_time']}" class="form-control"/>
						<span class='input-group-addon'>秒  最长时间</span>
                   		<input type="number" name="game[max_time]" value="{$settings['game']['max_time']}" class="form-control"/>
						<span class='input-group-addon'>秒</span>
		            </div>
		            <div class="help-block">键盘每次更改顺序的时间范围。<span style="color:red;">若最短时间设置为0，则键盘将一直不会更改</span></div>
            	</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">挑战成功数字</label>
            	<div class="col-sm-9">
	                <input type="number" class='form-control' name='game[maxNum]' value='{if empty($settings["game"]["maxNum"])}500{else}{$settings["game"]["maxNum"]}{/if}' />
            		<div class="help-block">玩法1：建议输入100~999之间的整数。</div>
            	</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">分享标题</label>
            	<div class="col-sm-9">
                	<input class='form-control' name='share0[title]' value='{$settings["share0"]["title"]}' placeholder="#nickname#的智力分享">
            		<div class="help-block">#nickname#为用户昵称占位符</div>
            	</div>
          	</div>
          	<div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">分享图片</label>
	            <div class="col-sm-9 col-xs-12">
	               	{php echo tpl_form_field_image('share0[pic]',$settings['share0']['pic']);}
	               	<div class="help-block">建议上传5*4大小的图片</div>
	            </div>
	        </div>
	 	</div>
	 </div>	
	<div class="panel panel-default">
	 	<div class="panel-heading">【挑战注意力】游戏设置<small style="color:red;">该游戏，用户进入游戏界面就扣除用户一次挑战次数</small></div>
	 	<div class="panel-body">
	 		<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">状态</label>
				<div class="col-sm-9">
					<label><input type="radio" name="game_status[game1]" {if empty($settings['game_status']['game1'])}checked="checked"{/if} value="0"> 关闭</label>
					<label style="margin-left: 10px;"><input type="radio" name="game_status[game1]" {if $settings['game_status']['game1']==1}checked="checked"{/if} value="1"> 开启</label>
				</div>
			</div>
			<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">排序</label>
            	<div class="col-sm-9">
			    	<input type="number" name="sort[1]" value="{$settings['sort']['1']}" class="form-control"/>
		            <div class="help-block">值越大，排在越前</div>
            	</div>
          	</div>
	 		<div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">首页大图</label>
	            <div class="col-sm-9 col-xs-12">
	               	{php echo tpl_form_field_image('game1[logo]',empty($settings['game1']['logo'])?'../addons/junsion_challeng/public/img/hecheng.png':$settings['game1']['logo']);}
	               	<div class="help-block">建议上传500*300大小的图片,不上传则使用系统默认</div>
	            </div>
	        </div>
	        <div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">数字顺序变换时间</label>
            	<div class="col-sm-9">
                	<div class='input-group'>
			    		<span class='input-group-addon'>最短时间</span>
			    		<input type="number" name="game1[min_time]" value="{$settings['game1']['min_time']}" class="form-control"/>
						<span class='input-group-addon'>秒  最长时间</span>
                   		<input type="number" name="game1[max_time]" value="{$settings['game1']['max_time']}" class="form-control"/>
						<span class='input-group-addon'>秒</span>
		            </div>
		            <div class="help-block">数字顺序每次更改顺序的时间范围。<span style="color:red;">若最短时间设置为0，则键盘将一直不会更改</span></div>
            	</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">挑战成功数字</label>
            	<div class="col-sm-9">
	                <input type="number" class='form-control' name='game1[maxNum]' value='{if empty($settings["game1"]["maxNum"])}49{else}{$settings["game1"]["maxNum"]}{/if}' />
            		<div class="help-block">建议输入7的倍数，建议输入49。</div>
            	</div>
          	</div>
	 		<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">游戏时长</label>
            	<div class="col-sm-9">
	                <div class='input-group'>	
	                	<input type="text" class='form-control' name='game1[times]' value='{if !empty($settings["game1"]["times"])}{$settings["game1"]["times"]}{else}40{/if}' />
	            		<span class='input-group-addon'>秒</span>
            		</div>
            		<div class='help-block'>玩法2游戏时长，建议40秒</div>
            	</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">分享标题</label>
            	<div class="col-sm-9">
                	<input class='form-control' name='share1[title]' value='{$settings["share1"]["title"]}' placeholder="#nickname#的智力分享">
            		<div class="help-block">#nickname#为用户昵称占位符</div>
            	</div>
          	</div>
          	<div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">分享图片</label>
	            <div class="col-sm-9 col-xs-12">
	               	{php echo tpl_form_field_image('share1[pic]',$settings['share1']['pic']);}
	               	<div class="help-block">建议上传5*4大小的图片</div>
	            </div>
	        </div>
	 	</div>
	 </div>	
	 <div class="panel panel-default">
	 	<div class="panel-heading">【挑战知识】游戏设置<small style="color:red;">该游戏，用户进入游戏界面就扣除用户一次挑战次数</small></div>
	 	<div class="panel-body">
	 		<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">状态</label>
				<div class="col-sm-9">
					<label><input type="radio" name="game_status[game2]" {if empty($settings['game_status']['game2'])}checked="checked"{/if} value="0"> 关闭</label>
					<label style="margin-left: 10px;"><input type="radio" name="game_status[game2]" {if $settings['game_status']['game2']==1}checked="checked"{/if} value="1"> 开启</label>
				</div>
			</div>
			<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">排序</label>
            	<div class="col-sm-9">
			    	<input type="number" name="sort[2]" value="{$settings['sort']['2']}" class="form-control"/>
		            <div class="help-block">值越大，排在越前</div>
            	</div>
          	</div>
	 		<div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">首页大图</label>
	            <div class="col-sm-9 col-xs-12">
	               	{php echo tpl_form_field_image('game2[logo]',empty($settings['game2']['logo'])?'../addons/junsion_challeng/public/img/zhishi.png':$settings['game2']['logo']);}
	               	<div class="help-block">建议上传500*300大小的图片,不上传则使用系统默认</div>
	            </div>
	        </div>
	        <div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">每一题思考时间</label>
            	<div class="col-sm-9">
	                <div class='input-group'>	
	                	<input type="text" class='form-control' name='game2[times]' value='{if !empty($settings["game2"]["times"])}{$settings["game2"]["times"]}{else}10{/if}' />
	            		<span class='input-group-addon'>秒</span>
            		</div>
            		<div class='help-block'>用户思考时间，建议10秒</div>
            	</div>
          	</div>
	        <div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">挑战倒计时</label>
            	<div class="col-sm-9">
	                <div class='input-group'>	
	                	<input type="text" class='form-control' name='game2[down]' value='{if !empty($settings["game2"]["down"])}{$settings["game2"]["down"]}{else}5{/if}' />
	            		<span class='input-group-addon'>秒</span>
            		</div>
            		<div class='help-block'>游戏开始前倒计时，建议3秒</div>
            	</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">成功总题数</label>
            	<div class="col-sm-9">
	                <div class='input-group'>	
	                	<input type="text" class='form-control' name='game2[problem]' value='{if !empty($settings["game2"]["problem"])}{$settings["game2"]["problem"]}{else}10{/if}' />
	            		<span class='input-group-addon'>题</span>
            		</div>
            		<div class='help-block'>用户闯关成功序回答的题数，建议10题</div>
            	</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">成功总题数</label>
            	<div class="col-sm-9">
	                <div class='input-group'>	
	                	<span class='input-group-addon'>前</span>
	                	<input type="text" class='form-control' name='game2[first]' value='{$settings["game2"]["first"]}' />
	            		<span class='input-group-addon'>题简单&nbsp;&nbsp;前</span>
	            		<input type="text" class='form-control' name='game2[second]' value='{$settings["game2"]["second"]}' />
	            		<span class='input-group-addon'>题中等&nbsp;&nbsp;前</span>
	            		<input type="text" class='form-control' name='game2[third]' value='{$settings["game2"]["third"]}' />
	            		<span class='input-group-addon'>题困难</span>
            		</div>
            		<div class='help-block'>出题难度。如：3，6，10。则表示1~3题为简单难度的题；4~6题为中等难度的题；7~10题为困难难度的题。如若不填，则默认为困难难度的题目</div>
            	</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">分享标题</label>
            	<div class="col-sm-9">
                	<input class='form-control' name='share2[title]' value='{$settings["share2"]["title"]}' placeholder="#nickname#的智力分享">
            		<div class="help-block">#nickname#为用户昵称占位符</div>
            	</div>
          	</div>
          	<div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">分享图片</label>
	            <div class="col-sm-9 col-xs-12">
	               	{php echo tpl_form_field_image('share2[pic]',$settings['share2']['pic']);}
	               	<div class="help-block">建议上传5*4大小的图片</div>
	            </div>
	        </div>
	     </div>
	 </div>
	 <div class="panel panel-default">
	 	<div class="panel-heading">【加减大师】游戏设置<small style="color:red;">该游戏，用户进入游戏界面就扣除用户一次挑战次数</small></div>
	 	<div class="panel-body">
	 		<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">状态</label>
				<div class="col-sm-9">
					<label><input type="radio" name="game_status[game3]" {if empty($settings['game_status']['game3'])}checked="checked"{/if} value="0"> 关闭</label>
					<label style="margin-left: 10px;"><input type="radio" name="game_status[game3]" {if $settings['game_status']['game3']==1}checked="checked"{/if} value="1"> 开启</label>
				</div>
			</div>
			<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">排序</label>
            	<div class="col-sm-9">
			    	<input type="number" name="sort[3]" value="{$settings['sort']['3']}" class="form-control"/>
		            <div class="help-block">值越大，排在越前</div>
            	</div>
          	</div>
	 		<div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">首页大图</label>
	            <div class="col-sm-9 col-xs-12">
	               	{php echo tpl_form_field_image('game3[logo]',empty($settings['game3']['logo'])?'../addons/junsion_challeng/public/img/jiajian.png':$settings['game3']['logo']);}
	               	<div class="help-block">建议上传500*300大小的图片,不上传则使用系统默认</div>
	            </div>
	        </div>
	        <div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">成功总题数</label>
            	<div class="col-sm-9">
	                <div class='input-group'>	
	                	<input type="text" class='form-control' name='game3[total]' value='{if !empty($settings["game3"]["total"])}{$settings["game3"]["total"]}{else}60{/if}' />
	            		<span class='input-group-addon'>题</span>
            		</div>
            		<div class='help-block'>用户闯关成功序回答的题数，建议60题</div>
            	</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">答题时间及难度设置</label>
            	<div class="col-sm-9">
	                <div class='input-group'>
	                	<span class='input-group-addon'>简单难度：前</span>	
	                	<input type="text" class='form-control' name='game3[firstnum]' value='{$settings["game3"]["firstnum"]}' />
	            		<span class='input-group-addon'>题 用户回答时间</span>
	                	<input type="text" class='form-control' name='game3[firsttime]' value='{$settings["game3"]["firsttime"]}' />
	            		<span class='input-group-addon'>秒</span>
            		</div>
            		<div class='help-block'>该难度为个位数加减</div>
            	</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">答题时间及难度设置</label>
            	<div class="col-sm-9">
	                <div class='input-group'>
	                	<span class='input-group-addon'>中等难度：前</span>	
	                	<input type="text" class='form-control' name='game3[secondnum]' value='{$settings["game3"]["secondnum"]}' />
	            		<span class='input-group-addon'>题 用户回答时间</span>
	                	<input type="text" class='form-control' name='game3[secondtime]' value='{$settings["game3"]["secondtime"]}' />
	            		<span class='input-group-addon'>秒</span>
            		</div>
            		<div class='help-block'>该难度为两位数加减</div>
            	</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">答题时间及难度设置</label>
            	<div class="col-sm-9">
	                <div class='input-group'>
	                	<span class='input-group-addon'>困难难度：前</span>	
	                	<input type="text" class='form-control' name='game3[thirdnum]' value='{$settings["game3"]["thirdnum"]}' />
	            		<span class='input-group-addon'>题 用户回答时间</span>
	                	<input type="text" class='form-control' name='game3[thirdtime]' value='{$settings["game3"]["thirdtime"]}' />
	            		<span class='input-group-addon'>秒</span>
            		</div>
            		<div class='help-block'>该难度为三位数加减</div>
            	</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label"></label>
            	<div class="col-sm-9">
            		<div class='help-block' style="color:red;">注意：若不设置答题时间及难度，则默认难度为简单难度，用户回答时间5秒</div>
          		</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">挑战倒计时</label>
            	<div class="col-sm-9">
	                <div class='input-group'>	
	                	<input type="text" class='form-control' name='game3[down]' value='{if !empty($settings["game3"]["down"])}{$settings["game3"]["down"]}{else}5{/if}' />
	            		<span class='input-group-addon'>秒</span>
            		</div>
            		<div class='help-block'>游戏开始前倒计时，建议3秒</div>
            	</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">分享标题</label>
            	<div class="col-sm-9">
                	<input class='form-control' name='share3[title]' value='{$settings["share3"]["title"]}' placeholder="#nickname#的加减大师">
            		<div class="help-block">#nickname#为用户昵称占位符</div>
            	</div>
          	</div>
          	<div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">分享图片</label>
	            <div class="col-sm-9 col-xs-12">
	               	{php echo tpl_form_field_image('share3[pic]',$settings['share3']['pic']);}
	               	<div class="help-block">建议上传5*4大小的图片</div>
	            </div>
	        </div>
	     </div>
	 </div>
	 <div class="panel panel-default">
	 	<div class="panel-heading">【成语填填看】游戏设置<small style="color:red;">该游戏，用户进入游戏界面就扣除用户一次挑战次数</small></div>
	 	<div class="panel-body">
	 		<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">状态</label>
				<div class="col-sm-9">
					<label><input type="radio" name="game_status[game4]" {if empty($settings['game_status']['game4'])}checked="checked"{/if} value="0"> 关闭</label>
					<label style="margin-left: 10px;"><input type="radio" name="game_status[game4]" {if $settings['game_status']['game4']==1}checked="checked"{/if} value="1"> 开启</label>
				</div>
			</div>
			<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">排序</label>
            	<div class="col-sm-9">
			    	<input type="number" name="sort[4]" value="{$settings['sort']['4']}" class="form-control"/>
		            <div class="help-block">值越大，排在越前</div>
            	</div>
          	</div>
	 		<div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">首页大图</label>
	            <div class="col-sm-9 col-xs-12">
	               	{php echo tpl_form_field_image('game4[logo]',empty($settings['game4']['logo'])?'../addons/junsion_challeng/public/img/chengyu.png':$settings['game4']['logo']);}
	               	<div class="help-block">建议上传500*300大小的图片,不上传则使用系统默认</div>
	            </div>
	        </div>
	        <div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">成功总题数</label>
            	<div class="col-sm-9">
	                <div class='input-group'>	
	                	<input type="text" class='form-control' name='game4[total]' value='{if !empty($settings["game4"]["total"])}{$settings["game4"]["total"]}{else}60{/if}' />
	            		<span class='input-group-addon'>题</span>
            		</div>
            		<div class='help-block'>用户闯关成功序回答的题数，建议60题</div>
            	</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">答题时间及难度设置</label>
            	<div class="col-sm-9">
	                <div class='input-group'>
	                	<span class='input-group-addon'>简单难度：前</span>	
	                	<input type="text" class='form-control' name='game4[firstnum]' value='{$settings["game4"]["firstnum"]}' />
	            		<span class='input-group-addon'>题 用户回答时间</span>
	                	<input type="text" class='form-control' name='game4[firsttime]' value='{$settings["game4"]["firsttime"]}' />
	            		<span class='input-group-addon'>秒</span>
            		</div>
            	</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">答题时间及难度设置</label>
            	<div class="col-sm-9">
	                <div class='input-group'>
	                	<span class='input-group-addon'>中等难度：前</span>	
	                	<input type="text" class='form-control' name='game4[secondnum]' value='{$settings["game4"]["secondnum"]}' />
	            		<span class='input-group-addon'>题 用户回答时间</span>
	                	<input type="text" class='form-control' name='game4[secondtime]' value='{$settings["game4"]["secondtime"]}' />
	            		<span class='input-group-addon'>秒</span>
            		</div>
            	</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">答题时间及难度设置</label>
            	<div class="col-sm-9">
	                <div class='input-group'>
	                	<span class='input-group-addon'>困难难度：前</span>	
	                	<input type="text" class='form-control' name='game4[thirdnum]' value='{$settings["game4"]["thirdnum"]}' />
	            		<span class='input-group-addon'>题 用户回答时间</span>
	                	<input type="text" class='form-control' name='game4[thirdtime]' value='{$settings["game4"]["thirdtime"]}' />
	            		<span class='input-group-addon'>秒</span>
            		</div>
            	</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label"></label>
            	<div class="col-sm-9">
            		<div class='help-block' style="color:red;">注意：若不设置答题时间及难度，则默认难度为简单难度，用户回答时间5秒。【此游戏建议用户回答时间为简单5秒，中等4秒，困难3秒】</div>
          		</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">挑战倒计时</label>
            	<div class="col-sm-9">
	                <div class='input-group'>	
	                	<input type="text" class='form-control' name='game4[down]' value='{if !empty($settings["game4"]["down"])}{$settings["game4"]["down"]}{else}5{/if}' />
	            		<span class='input-group-addon'>秒</span>
            		</div>
            		<div class='help-block'>游戏开始前倒计时，建议3秒</div>
            	</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">分享标题</label>
            	<div class="col-sm-9">
                	<input class='form-control' name='share4[title]' value='{$settings["share4"]["title"]}' placeholder="#nickname#的成语填填看">
            		<div class="help-block">#nickname#为用户昵称占位符</div>
            	</div>
          	</div>
          	<div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">分享图片</label>
	            <div class="col-sm-9 col-xs-12">
	               	{php echo tpl_form_field_image('share4[pic]',$settings['share4']['pic']);}
	               	<div class="help-block">建议上传5*4大小的图片</div>
	            </div>
	        </div>
	     </div>
	 </div>
	 <div class="panel panel-default">
	 	<div class="panel-heading">【看图填词】游戏设置<small style="color:red;">该游戏，用户进入游戏界面就扣除用户一次挑战次数</small></div>
	 	<div class="panel-body">
	 		<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">状态</label>
				<div class="col-sm-9">
					<label><input type="radio" name="game_status[game5]" {if empty($settings['game_status']['game5'])}checked="checked"{/if} value="0"> 关闭</label>
					<label style="margin-left: 10px;"><input type="radio" name="game_status[game5]" {if $settings['game_status']['game5']==1}checked="checked"{/if} value="1"> 开启</label>
				</div>
			</div>
			<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">图片存储路径</label>
            	<div class="col-sm-9">
			    	<input type="text" name="game5[iurl]" value="{$settings['game5']['iurl']}" class="form-control"/>
		            <div class="help-block" style="color:red;">注意，如果是本地图片，则留空，图片素材放于addons/junsion_challeng/public/下面</div>
		            <div class="help-block" style="color:red;">如果图片存于第三方存储空间，请填写可访问域名；例如七牛：http://7xpmfl.xxxxx.clouddn.com/</div>
		            <div class="help-block" style="color: blue;"><a href='http://p634ef8ke.bkt.clouddn.com/pics.zip'>点击下载图片素材</a></div>
            	</div>
          	</div>
			<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">排序</label>
            	<div class="col-sm-9">
			    	<input type="number" name="sort[5]" value="{$settings['sort']['5']}" class="form-control"/>
		            <div class="help-block">值越大，排在越前</div>
            	</div>
          	</div>
	 		<div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">首页大图</label>
	            <div class="col-sm-9 col-xs-12">
	               	{php echo tpl_form_field_image('game5[logo]',empty($settings['game5']['logo'])?'../addons/junsion_challeng/public/img/pic.png':$settings['game5']['logo']);}
	               	<div class="help-block">建议上传500*300大小的图片,不上传则使用系统默认</div>
	            </div>
	        </div>
	        <div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">成功总题数</label>
            	<div class="col-sm-9">
	                <div class='input-group'>	
	                	<input type="text" class='form-control' name='game5[total]' value='{if !empty($settings["game5"]["total"])}{$settings["game5"]["total"]}{else}60{/if}' />
	            		<span class='input-group-addon'>题</span>
            		</div>
            		<div class='help-block'>用户闯关成功序回答的题数，建议60题</div>
            	</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">答题时间及难度设置</label>
            	<div class="col-sm-9">
	                <div class='input-group'>
	                	<span class='input-group-addon'>简单难度：前</span>	
	                	<input type="text" class='form-control' name='game5[firstnum]' value='{$settings["game5"]["firstnum"]}' />
	            		<span class='input-group-addon'>题 用户回答时间</span>
	                	<input type="text" class='form-control' name='game5[firsttime]' value='{$settings["game5"]["firsttime"]}' />
	            		<span class='input-group-addon'>秒</span>
            		</div>
            	</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">答题时间及难度设置</label>
            	<div class="col-sm-9">
	                <div class='input-group'>
	                	<span class='input-group-addon'>中等难度：前</span>	
	                	<input type="text" class='form-control' name='game5[secondnum]' value='{$settings["game5"]["secondnum"]}' />
	            		<span class='input-group-addon'>题 用户回答时间</span>
	                	<input type="text" class='form-control' name='game5[secondtime]' value='{$settings["game5"]["secondtime"]}' />
	            		<span class='input-group-addon'>秒</span>
            		</div>
            	</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">答题时间及难度设置</label>
            	<div class="col-sm-9">
	                <div class='input-group'>
	                	<span class='input-group-addon'>困难难度：前</span>	
	                	<input type="text" class='form-control' name='game5[thirdnum]' value='{$settings["game5"]["thirdnum"]}' />
	            		<span class='input-group-addon'>题 用户回答时间</span>
	                	<input type="text" class='form-control' name='game5[thirdtime]' value='{$settings["game5"]["thirdtime"]}' />
	            		<span class='input-group-addon'>秒</span>
            		</div>
            	</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label"></label>
            	<div class="col-sm-9">
            		<div class='help-block' style="color:red;">注意：若不设置答题时间及难度，则默认难度为简单难度，用户回答时间5秒。【此游戏建议用户回答时间为简单10秒，中等7秒，困难4秒】</div>
          		</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">挑战倒计时</label>
            	<div class="col-sm-9">
	                <div class='input-group'>	
	                	<input type="text" class='form-control' name='game5[down]' value='{if !empty($settings["game5"]["down"])}{$settings["game5"]["down"]}{else}5{/if}' />
	            		<span class='input-group-addon'>秒</span>
            		</div>
            		<div class='help-block'>游戏开始前倒计时，建议3秒</div>
            	</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">分享标题</label>
            	<div class="col-sm-9">
                	<input class='form-control' name='share5[title]' value='{$settings["share5"]["title"]}' placeholder="#nickname#的看图填词">
            		<div class="help-block">#nickname#为用户昵称占位符</div>
            	</div>
          	</div>
          	<div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">分享图片</label>
	            <div class="col-sm-9 col-xs-12">
	               	{php echo tpl_form_field_image('share5[pic]',$settings['share5']['pic']);}
	               	<div class="help-block">建议上传5*4大小的图片</div>
	            </div>
	        </div>
	     </div>
	 </div>  
	 
	 {if isGameHost(6) || $_W['isfounder']}
	 <div class="panel panel-default">
	 	<div class="panel-heading">【猜歌达人】游戏设置<small style="color:red;">该游戏，用户进入游戏界面就扣除用户一次挑战次数</small></div>
	 	<div class="panel-body">
	 		<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">状态</label>
				<div class="col-sm-9">
					<label><input type="radio" name="game_status[game6]" {if empty($settings['game_status']['game6'])}checked="checked"{/if} value="0"> 关闭</label>
					<label style="margin-left: 10px;"><input {if !isGameHost(6)}disabled{/if} type="radio" name="game_status[game6]" {if $settings['game_status']['game6']==1}checked="checked"{/if} value="1"> 开启 {if !isGameHost(6)}<font style='color:red'>(需要联系开发者付费开通)</font>{/if}</label>
				</div>
			</div>
			<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">歌曲存储路径</label>
            	<div class="col-sm-9">
			    	<input type="text" name="game6[iurl]" value="{$settings['game6']['iurl']}" class="form-control"/>
		            <div class="help-block" style="color:red;">注意，如果是本地歌曲，则留空，歌曲素材放于addons/junsion_challeng/public/下面(歌曲库解压出来的是带music文件夹的，整个文件夹上传)</div>
		            <div class="help-block" style="color:red;">如果歌曲存于第三方存储空间，请填写可访问域名；例如七牛：http://7xpmfl.xxxxx.clouddn.com/</div>
		            <div class="help-block" style="color: blue;"><a href='http://p634ef8ke.bkt.clouddn.com/musics.zip'>点击下载歌曲素材</a></div>
            	</div>
          	</div>
			<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">排序</label>
            	<div class="col-sm-9">
			    	<input type="number" name="sort[6]" value="{$settings['sort']['6']}" class="form-control"/>
		            <div class="help-block">值越大，排在越前</div>
            	</div>
          	</div>
	 		<div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">首页大图</label>
	            <div class="col-sm-9 col-xs-12">
	               	{php echo tpl_form_field_image('game6[logo]',empty($settings['game6']['logo'])?'../addons/junsion_challeng/public/img/music.png':$settings['game6']['logo']);}
	               	<div class="help-block">建议上传500*300大小的图片,不上传则使用系统默认</div>
	            </div>
	        </div>
	        <div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">成功总题数</label>
            	<div class="col-sm-9">
	                <div class='input-group'>	
	                	<input type="text" class='form-control' name='game6[total]' value='{if !empty($settings["game6"]["total"])}{$settings["game6"]["total"]}{else}60{/if}' />
	            		<span class='input-group-addon'>题</span>
            		</div>
            		<div class='help-block'>用户闯关成功序回答的题数，建议60题</div>
            	</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">答题时间及难度设置</label>
            	<div class="col-sm-9">
	                <div class='input-group'>
	                	<span class='input-group-addon'>简单难度：前</span>	
	                	<input type="text" class='form-control' name='game6[firstnum]' value='{$settings["game6"]["firstnum"]}' />
	            		<span class='input-group-addon'>题 用户回答时间</span>
	                	<input type="text" class='form-control' name='game6[firsttime]' value='{$settings["game6"]["firsttime"]}' />
	            		<span class='input-group-addon'>秒</span>
            		</div>
            	</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">答题时间及难度设置</label>
            	<div class="col-sm-9">
	                <div class='input-group'>
	                	<span class='input-group-addon'>中等难度：前</span>	
	                	<input type="text" class='form-control' name='game6[secondnum]' value='{$settings["game6"]["secondnum"]}' />
	            		<span class='input-group-addon'>题 用户回答时间</span>
	                	<input type="text" class='form-control' name='game6[secondtime]' value='{$settings["game6"]["secondtime"]}' />
	            		<span class='input-group-addon'>秒</span>
            		</div>
            	</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">答题时间及难度设置</label>
            	<div class="col-sm-9">
	                <div class='input-group'>
	                	<span class='input-group-addon'>困难难度：前</span>	
	                	<input type="text" class='form-control' name='game6[thirdnum]' value='{$settings["game6"]["thirdnum"]}' />
	            		<span class='input-group-addon'>题 用户回答时间</span>
	                	<input type="text" class='form-control' name='game6[thirdtime]' value='{$settings["game6"]["thirdtime"]}' />
	            		<span class='input-group-addon'>秒</span>
            		</div>
            	</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label"></label>
            	<div class="col-sm-9">
            		<div class='help-block' style="color:red;">注意：若不设置答题时间及难度，则默认难度为简单难度，用户回答时间5秒。【此游戏建议用户回答时间为简单10秒，中等7秒，困难4秒】</div>
          		</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">挑战倒计时</label>
            	<div class="col-sm-9">
	                <div class='input-group'>	
	                	<input type="text" class='form-control' name='game6[down]' value='{if !empty($settings["game6"]["down"])}{$settings["game6"]["down"]}{else}5{/if}' />
	            		<span class='input-group-addon'>秒</span>
            		</div>
            		<div class='help-block'>游戏开始前倒计时，建议3秒</div>
            	</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">分享标题</label>
            	<div class="col-sm-9">
                	<input class='form-control' name='share6[title]' value='{$settings["share6"]["title"]}' placeholder="#nickname#的猜歌达人">
            		<div class="help-block">#nickname#为用户昵称占位符</div>
            	</div>
          	</div>
          	<div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">分享图片</label>
	            <div class="col-sm-9 col-xs-12">
	               	{php echo tpl_form_field_image('share6[pic]',$settings['share6']['pic']);}
	               	<div class="help-block">建议上传5*4大小的图片</div>
	            </div>
	        </div>
	     </div>
	 </div>  
	{/if}
	
	{if isGameHost(7) || $_W['isfounder']}
	 <div class="panel panel-default">
	 	<div class="panel-heading">【挑战眼力】游戏设置<small style="color:red;">该游戏，用户进入游戏界面就扣除用户一次挑战次数</small></div>
	 	<div class="panel-body">
	 		<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">状态</label>
				<div class="col-sm-9">
					<label><input type="radio" name="game_status[game7]" {if empty($settings['game_status']['game7'])}checked="checked"{/if} value="0"> 关闭</label>
					<label style="margin-left: 10px;"><input {if !isGameHost(7)}disabled{/if} type="radio" name="game_status[game7]" {if $settings['game_status']['game7']==1}checked="checked"{/if} value="1"> 开启 {if !isGameHost(7)}<font style='color:red'>(需要联系开发者付费开通)</font>{/if}</label>
				</div>
			</div>
			<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">排序</label>
            	<div class="col-sm-9">
			    	<input type="number" name="sort[7]" value="{$settings['sort']['7']}" class="form-control"/>
		            <div class="help-block">值越大，排在越前</div>
            	</div>
          	</div>
	 		<div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">首页大图</label>
	            <div class="col-sm-9 col-xs-12">
	               	{php echo tpl_form_field_image('game7[logo]',empty($settings['game7']['logo'])?'../addons/junsion_challeng/public/img/yanli.png':$settings['game7']['logo']);}
	               	<div class="help-block">建议上传500*300大小的图片,不上传则使用系统默认</div>
	            </div>
	        </div>
	        <div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">成功总题数</label>
            	<div class="col-sm-9">
	                <div class='input-group'>	
	                	<input type="text" class='form-control' name='game7[total]' value='{if !empty($settings["game7"]["total"])}{$settings["game7"]["total"]}{else}60{/if}' />
	            		<span class='input-group-addon'>题</span>
            		</div>
            		<div class='help-block'>用户闯关成功回答的题数，建议60题</div>
            	</div>
          	</div>
	        <div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">挑战总时间</label>
            	<div class="col-sm-9">
	                <div class='input-group'>	
	                	<input type="text" class='form-control' name='game7[total_time]' value='{if !empty($settings["game7"]["total_time"])}{$settings["game7"]["total_time"]}{else}100{/if}' />
	            		<span class='input-group-addon'>秒</span>
            		</div>
            		<div class='help-block'>用户闯关成功的时间</div>
            	</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">挑战时间及难度设置</label>
            	<div class="col-sm-9">
	                <div class='input-group'>
	                	<span class='input-group-addon'>简单难度：前</span>	
	                	<input type="text" class='form-control' name='game7[firstnum]' value='{$settings["game7"]["firstnum"]}' />
	            		<span class='input-group-addon'>关</span>
	                	<input type="text" class='form-control' name='game7[firsttime]' value='{$settings["game7"]["firsttime"]}' />
	            		<span class='input-group-addon'>维色块</span>
	                	<input type="text" class='form-control' name='game7[firstcolor]' value='{$settings["game7"]["firstcolor"]}' />
	            		<span class='input-group-addon'>色差</span>
            		</div>
            	</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">挑战时间及难度设置</label>
            	<div class="col-sm-9">
	                <div class='input-group'>
	                	<span class='input-group-addon'>中等难度：前</span>	
	                	<input type="text" class='form-control' name='game7[secondnum]' value='{$settings["game7"]["secondnum"]}' />
	            		<span class='input-group-addon'>关</span>
	                	<input type="text" class='form-control' name='game7[secondtime]' value='{$settings["game7"]["secondtime"]}' />
	            		<span class='input-group-addon'>维色块</span>
	                	<input type="text" class='form-control' name='game7[secondcolor]' value='{$settings["game7"]["secondcolor"]}' />
	            		<span class='input-group-addon'>色差</span>
            		</div>
            	</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">挑战时间及难度设置</label>
            	<div class="col-sm-9">
	                <div class='input-group'>
	                	<span class='input-group-addon'>困难难度：前</span>	
	                	<input type="text" class='form-control' name='game7[thirdnum]' value='{$settings["game7"]["thirdnum"]}' />
	            		<span class='input-group-addon'>关</span>
	                	<input type="text" class='form-control' name='game7[thirdtime]' value='{$settings["game7"]["thirdtime"]}' />
	            		<span class='input-group-addon'>维色块</span>
	                	<input type="text" class='form-control' name='game7[thirdcolor]' value='{$settings["game7"]["thirdcolor"]}' />
	            		<span class='input-group-addon'>色差</span>
            		</div>
            	</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label"></label>
            	<div class="col-sm-9">
            		<div class='help-block' style="color:red;">注意：维数最小不能小于2，最大不能大于9，若超出范围，则默认为9维色块</div>
            		<div class='help-block' style="color:red;">注意：若不设置挑战时间及难度，则默认难度为困难难度，9维色块，即9*9，81个方格</div>
            		<div class='help-block' style="color:red;">注意：色差指特殊颜色与普通的的相似度大小，色差只越小颜色余额相似,若色差值不填，则默认50,色差值范围在0~255内，超出范围，则默认50,</div>
          		</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">挑战倒计时</label>
            	<div class="col-sm-9">
	                <div class='input-group'>	
	                	<input type="text" class='form-control' name='game7[down]' value='{if !empty($settings["game7"]["down"])}{$settings["game7"]["down"]}{else}3{/if}' />
	            		<span class='input-group-addon'>秒</span>
            		</div>
            		<div class='help-block'>游戏开始前倒计时，建议3秒</div>
            	</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">分享标题</label>
            	<div class="col-sm-9">
                	<input class='form-control' name='share7[title]' value='{$settings["share7"]["title"]}' placeholder="#nickname#的挑战眼力">
            		<div class="help-block">#nickname#为用户昵称占位符</div>
            	</div>
          	</div>
          	<div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">分享图片</label>
	            <div class="col-sm-9 col-xs-12">
	               	{php echo tpl_form_field_image('share7[pic]',$settings['share7']['pic']);}
	               	<div class="help-block">建议上传5*4大小的图片</div>
	            </div>
	        </div>
	     </div>
	 </div>  
	{/if}
	{if isGameHost(8) || $_W['isfounder']}
	 <div class="panel panel-default">
	 	<div class="panel-heading">【多彩青蛙】游戏设置<small style="color:red;">该游戏，用户进入游戏界面就扣除用户一次挑战次数</small></div>
	 	<div class="panel-body">
	 		<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">状态</label>
				<div class="col-sm-9">
					<label><input type="radio" name="game_status[game8]" {if empty($settings['game_status']['game8'])}checked="checked"{/if} value="0"> 关闭</label>
					<label style="margin-left: 10px;"><input {if !isGameHost(8)}disabled{/if} type="radio" name="game_status[game8]" {if $settings['game_status']['game8']==1}checked="checked"{/if} value="1"> 开启 {if !isGameHost(8)}<font style='color:red'>(需要联系开发者付费开通)</font>{/if}</label>
				</div>
			</div>
			<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">排序</label>
            	<div class="col-sm-9">
			    	<input type="number" name="sort[8]" value="{$settings['sort']['8']}" class="form-control"/>
		            <div class="help-block">值越大，排在越前</div>
            	</div>
          	</div>
	 		<div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">首页大图</label>
	            <div class="col-sm-9 col-xs-12">
	               	{php echo tpl_form_field_image('game8[logo]',empty($settings['game8']['logo'])?'../addons/junsion_challeng/public/img/qingwa.png':$settings['game8']['logo']);}
	               	<div class="help-block">建议上传500*300大小的图片,不上传则使用系统默认</div>
	            </div>
	        </div>
	        <div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">成功总数</label>
            	<div class="col-sm-9">
	                <div class='input-group'>	
	                	<input type="text" class='form-control' name='game8[total]' value='{if !empty($settings["game8"]["total"])}{$settings["game8"]["total"]}{else}100{/if}' />
	            		<span class='input-group-addon'>关</span>
            		</div>
            		<div class='help-block'>用户闯关成功回答的关数，建议100关</div>
            	</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">挑战难度设置</label>
            	<div class="col-sm-9">
	                <div class='input-group'>
	                	<span class='input-group-addon'>简单难度：前</span>	
	                	<input type="text" class='form-control' name='game8[firstnum]' value='{$settings["game8"]["firstnum"]}' />
	            		<span class='input-group-addon'>关 青蛙跳动时间</span>
	                	<input type="text" class='form-control' name='game8[firsttime]' value='{$settings["game8"]["firsttime"]}' />
	            		<span class='input-group-addon'>毫秒</span>
            		</div>
            	</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">挑战时间及难度设置</label>
            	<div class="col-sm-9">
	                <div class='input-group'>
	                	<span class='input-group-addon'>中等难度：前</span>	
	                	<input type="text" class='form-control' name='game8[secondnum]' value='{$settings["game8"]["secondnum"]}' />
	            		<span class='input-group-addon'>关 青蛙跳动时间</span>
	                	<input type="text" class='form-control' name='game8[secondtime]' value='{$settings["game8"]["secondtime"]}' />
	            		<span class='input-group-addon'>毫秒</span>
            		</div>
            	</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">挑战时间及难度设置</label>
            	<div class="col-sm-9">
	                <div class='input-group'>
	                	<span class='input-group-addon'>困难难度：前</span>	
	                	<input type="text" class='form-control' name='game8[thirdnum]' value='{$settings["game8"]["thirdnum"]}' />
	            		<span class='input-group-addon'>关 青蛙跳动时间</span>
	                	<input type="text" class='form-control' name='game8[thirdtime]' value='{$settings["game8"]["thirdtime"]}' />
	            		<span class='input-group-addon'>毫秒</span>
            		</div>
            	</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label"></label>
            	<div class="col-sm-9">
            		<div class='help-block' style="color:red;">注意：若不设置挑战难度，则默认难度为困难难度 青蛙跳动时间为300毫秒</div>
          		</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">挑战倒计时</label>
            	<div class="col-sm-9">
	                <div class='input-group'>	
	                	<input type="text" class='form-control' name='game8[down]' value='{if !empty($settings["game8"]["down"])}{$settings["game8"]["down"]}{else}3{/if}' />
	            		<span class='input-group-addon'>秒</span>
            		</div>
            		<div class='help-block'>游戏开始前倒计时，建议3秒</div>
            	</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">分享标题</label>
            	<div class="col-sm-9">
                	<input class='form-control' name='share8[title]' value='{$settings["share8"]["title"]}' placeholder="#nickname#的多彩青蛙">
            		<div class="help-block">#nickname#为用户昵称占位符</div>
            	</div>
          	</div>
          	<div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">分享图片</label>
	            <div class="col-sm-9 col-xs-12">
	               	{php echo tpl_form_field_image('share8[pic]',$settings['share8']['pic']);}
	               	<div class="help-block">建议上传5*4大小的图片</div>
	            </div>
	        </div>
	     </div>
	 </div>  
	{/if}
	{if isGameHost(9) || $_W['isfounder']}
	 <div class="panel panel-default">
	 	<div class="panel-heading">【猴子过桥】游戏设置<small style="color:red;">该游戏，用户进入游戏界面就扣除用户一次挑战次数</small></div>
	 	<div class="panel-body">
	 		<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">状态</label>
				<div class="col-sm-9">
					<label><input type="radio" name="game_status[game9]" {if empty($settings['game_status']['game9'])}checked="checked"{/if} value="0"> 关闭</label>
					<label style="margin-left: 10px;"><input {if !isGameHost(9)}disabled{/if} type="radio" name="game_status[game9]" {if $settings['game_status']['game9']==1}checked="checked"{/if} value="1"> 开启 {if !isGameHost(9)}<font style='color:red'>(需要联系开发者付费开通)</font>{/if}</label>
				</div>
			</div>
			<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">排序</label>
            	<div class="col-sm-9">
			    	<input type="number" name="sort[9]" value="{$settings['sort']['9']}" class="form-control"/>
		            <div class="help-block">值越大，排在越前</div>
            	</div>
          	</div>
	 		<div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">首页大图</label>
	            <div class="col-sm-9 col-xs-12">
	               	{php echo tpl_form_field_image('game9[logo]',empty($settings['game9']['logo'])?'../addons/junsion_challeng/public/img/houzi.png':$settings['game9']['logo']);}
	               	<div class="help-block">建议上传500*300大小的图片,不上传则使用系统默认</div>
	            </div>
	        </div>
	        <div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">成功总数</label>
            	<div class="col-sm-9">
	                <div class='input-group'>	
	                	<input type="text" class='form-control' name='game9[total]' value='{if !empty($settings["game9"]["total"])}{$settings["game9"]["total"]}{else}100{/if}' />
	            		<span class='input-group-addon'>关</span>
            		</div>
            		<div class='help-block'>用户闯关成功回答的关数，建议100关</div>
            	</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">挑战难度设置</label>
            	<div class="col-sm-9">
	                <div class='input-group'>
	                	<span class='input-group-addon'>简单难度：前</span>	
	                	<input type="text" class='form-control' name='game9[firstnum]' value='{$settings["game9"]["firstnum"]}' />
	            		<span class='input-group-addon'>关 柱子</span>
	                	<input type="text" class='form-control' name='game9[firsttime]' value='{$settings["game9"]["firsttime"]}' />
	            		<span class='input-group-addon'>像素</span>
            		</div>
            	</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">挑战时间及难度设置</label>
            	<div class="col-sm-9">
	                <div class='input-group'>
	                	<span class='input-group-addon'>中等难度：前</span>	
	                	<input type="text" class='form-control' name='game9[secondnum]' value='{$settings["game9"]["secondnum"]}' />
	            		<span class='input-group-addon'>关 柱子</span>
	                	<input type="text" class='form-control' name='game9[secondtime]' value='{$settings["game9"]["secondtime"]}' />
	            		<span class='input-group-addon'>像素</span>
            		</div>
            	</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">挑战时间及难度设置</label>
            	<div class="col-sm-9">
	                <div class='input-group'>
	                	<span class='input-group-addon'>困难难度：前</span>	
	                	<input type="text" class='form-control' name='game9[thirdnum]' value='{$settings["game9"]["thirdnum"]}' />
	            		<span class='input-group-addon'>关 柱子</span>
	                	<input type="text" class='form-control' name='game9[thirdtime]' value='{$settings["game9"]["thirdtime"]}' />
	            		<span class='input-group-addon'>像素</span>
            		</div>
            	</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label"></label>
            	<div class="col-sm-9">
            		<div class='help-block' style="color:red;">注意：若不设置挑战难度，则默认难度为困难难度 柱子为10像素。最大不能超过100像素，最小不能低于1像素</div>
          		</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">挑战倒计时</label>
            	<div class="col-sm-9">
	                <div class='input-group'>	
	                	<input type="text" class='form-control' name='game9[down]' value='{if !empty($settings["game9"]["down"])}{$settings["game9"]["down"]}{else}3{/if}' />
	            		<span class='input-group-addon'>秒</span>
            		</div>
            		<div class='help-block'>游戏开始前倒计时，建议3秒</div>
            	</div>
          	</div>
          	<div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">桥图片</label>
	            <div class="col-sm-9 col-xs-12">
	               	{php echo tpl_form_field_image('game9[bridge]',empty($settings['game9']['bridge'])?'../addons/junsion_challeng/public/img/bridge.png':$settings['game9']['bridge']);}
	               	<div class="help-block">建议上传4*25大小的图片</div>
	            </div>
	        </div>
          	<div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">柱子图片</label>
	            <div class="col-sm-9 col-xs-12">
	               	{php echo tpl_form_field_image('game9[platform]',empty($settings['game9']['platform'])?'../addons/junsion_challeng/public/img/platform.png':$settings['game9']['platform']);}
	               	<div class="help-block">建议上传50*150大小的图片</div>
	            </div>
	        </div>
          	<div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">猴子静态图片</label>
	            <div class="col-sm-9 col-xs-12">
	               	{php echo tpl_form_field_image('game9[monkey]',empty($settings['game9']['monkey'])?'../addons/junsion_challeng/public/img/monkey.png':$settings['game9']['monkey']);}
	               	<div class="help-block">建议上传50*120大小的图片</div>
	            </div>
	        </div>
          	<div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">猴子动态图片</label>
	            <div class="col-sm-9 col-xs-12">
	               	{php echo tpl_form_field_image('game9[monkey1]',empty($settings['game9']['monkey1'])?'../addons/junsion_challeng/public/img/monkey1.gif':$settings['game9']['monkey1']);}
	               	<div class="help-block">建议上传50*120大小的图片</div>
	            </div>
	        </div>
	        <div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">游戏背景图片</label>
	            <div class="col-sm-9 col-xs-12">
	               	{php echo tpl_form_field_image('game9[g_bg]',empty($settings['game9']['g_bg'])?'../addons/junsion_challeng/public/img/g_bg.png':$settings['game9']['g_bg']);}
	               	<div class="help-block">建议上传850*1206大小的图片</div>
	            </div>
	        </div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">分享标题</label>
            	<div class="col-sm-9">
                	<input class='form-control' name='share9[title]' value='{$settings["share9"]["title"]}' placeholder="#nickname#的猴子过桥">
            		<div class="help-block">#nickname#为用户昵称占位符</div>
            	</div>
          	</div>
          	<div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">分享图片</label>
	            <div class="col-sm-9 col-xs-12">
	               	{php echo tpl_form_field_image('share9[pic]',$settings['share9']['pic']);}
	               	<div class="help-block">建议上传5*4大小的图片</div>
	            </div>
	        </div>
	     </div>
	 </div>  
	{/if}
</div>
<div class="panel panel-default settings">
 	<div class="panel-heading">审核设置</div>
	 	<div class="panel-body">
	 		{if $settings}
			<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">审核中版本号</label>
            	<div class="col-sm-9">
                	<input class='form-control' name='appversion' value='{$settings["appversion"]}' placeholder="审核中版本号">
                	<div class="help-block">程序提交审核时的版本号，若小程序中的版本号跟这里版本号相同，则会跳转去审核界面，避免影响正式运营的小程序</div>
            	</div>
          	</div>
			<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">审核游戏</label>
            	<div class="col-sm-9">
                	<select name="check_game" class='form-control'>
						<option value="0" {if $settings['check_game']==0}selected{/if}>挑战智力</option>                	
						<option value="1" {if $settings['check_game']==1}selected{/if}>挑战注意力</option>                	
						<option value="2" {if $settings['check_game']==2}selected{/if}>挑战知识</option>                	
						<option value="3" {if $settings['check_game']==3}selected{/if}>加减大师</option>                	
						<option value="4" {if $settings['check_game']==4}selected{/if}>成语填填看</option>                	
						<option value="5" {if $settings['check_game']==5}selected{/if}>看图填词</option>                	
						<option value="6" {if $settings['check_game']==6}selected{/if}>猜歌达人</option>                	
                	</select>
                	<div class="help-block">审核状态中展示的游戏</div>
            	</div>
          	</div>
			{if $_W['isfounder']}
			<div class="form-group">
	           <label class="col-xs-12 col-sm-3 col-md-2 control-label" style="padding-top: 0"> 上传参数</label>
	           <div class="col-sm-9 col-xs-12">
	           	{$_W['account']['name']}、{$_W['account']['key']}、{$_W['uniacid']}、{$settings["appversion"]}、{$_SERVER['HTTP_HOST']}、{$settings['junsiontoken']}
	           	<div class="help-block">上传更新时，请把上面这些参数复制发给开发者</div>
	           </div>
	        </div>
	        {/if}
	        <div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">通过审核后操作</label>
            	<div class="col-sm-9">
                	<div class="help-block">每次审核通过后，把上面的版本号改成 {php echo number_format($settings["appversion"]+1,1)} ；然后去发布小程序</div>
            	</div>
          	</div>
          	{else}
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label"></label>
            	<div class="col-sm-9">
                	<div class="help-block">保存参数设置后，才能查看</div>
            	</div>
          	</div>
          	{/if}
		</div>
</div>
<div class="settings">
	<div class="panel panel-default">
	 	<div class="panel-heading">界面设置</div>
	 	<div class="panel-body">
          	<div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">上一游戏图</label>
	            <div class="col-sm-9 col-xs-12">
	               	{php echo tpl_form_field_image('face[left]',$settings['face']['left']);}
	               	<div class="help-block">建议上传128:85大小的图片,不上传则使用系统默认</div>
	            </div>
	        </div>
          	<div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">下一游戏图</label>
	            <div class="col-sm-9 col-xs-12">
	               	{php echo tpl_form_field_image('face[right]',$settings['face']['right']);}
	               	<div class="help-block">建议上传128:85大小的图片,不上传则使用系统默认</div>
	            </div>
	        </div>
	        <div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">首页logo背景图</label>
	            <div class="col-sm-9 col-xs-12">
	               	{php echo tpl_form_field_image('face[home_bg]',$settings['face']['home_bg']?$settings['face']['home_bg']:'../addons/junsion_challeng/public/img/home_bg.png');}
	               	<div class="help-block">建议上传750*747大小的图片,不上传则使用系统默认</div>
	            </div>
	        </div>
	        <div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">排行榜标题背景图</label>
	            <div class="col-sm-9 col-xs-12">
	               	{php echo tpl_form_field_image('face[r_bg]',$settings['face']['r_bg']?$settings['face']['r_bg']:'../addons/junsion_challeng/public/img/r_bg.png');}
	               	<div class="help-block">建议上传400*80大小的图片,不上传则使用系统默认</div>
	            </div>
	        </div>
	        <div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">游戏页背景图</label>
	            <div class="col-sm-9 col-xs-12">
	               	{php echo tpl_form_field_image('face[game_bg]',$settings['face']['game_bg']?$settings['face']['game_bg']:'../addons/junsion_challeng/public/img/game_bg.png');}
	               	<div class="help-block">建议上传850*1206大小的图片,不上传则使用系统默认</div>
	            </div>
	        </div>
          	<div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">免费挑战按钮图</label>
	            <div class="col-sm-9 col-xs-12">
	               	{php echo tpl_form_field_image('face[btn]',$settings['face']['btn']);}
	               	<div class="help-block">建议上传128:85大小的图片,不上传则使用系统默认</div>
	            </div>
	        </div>
          	<div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">付费挑战按钮图</label>
	            <div class="col-sm-9 col-xs-12">
	               	{php echo tpl_form_field_image('face[btn1]',$settings['face']['btn1']);}
	               	<div class="help-block">建议上传128:85大小的图片,不上传则使用系统默认</div>
	            </div>
	        </div>
          	<div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">免费/付费挑战按钮背景图</label>
	            <div class="col-sm-9 col-xs-12">
	               	{php echo tpl_form_field_image('face[btn_bg]',$settings['face']['btn_bg']);}
	               	<div class="help-block">建议上传320:63大小的图片,不上传则使用系统默认</div>
	            </div>
	        </div>
          	<div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">客服图</label>
	            <div class="col-sm-9 col-xs-12">
	               	{php echo tpl_form_field_image('face[custom]',$settings['face']['custom']);}
	               	<div class="help-block">建议上传1:1大小的图片,不上传则使用系统默认</div>
	            </div>
	        </div>
          	<div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">首次进入欢迎图</label>
	            <div class="col-sm-9 col-xs-12">
	               	{php echo tpl_form_field_image('face[libao]',$settings['face']['libao']);}
	               	<div class="help-block">建议上传670:785大小的图片,不上传则使用系统默认</div>
	            </div>
	        </div>
          	<div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">默认奖品图</label>
	            <div class="col-sm-9 col-xs-12">
	               	{php echo tpl_form_field_image('face[reward]',$settings['face']['reward']);}
	               	<div class="help-block">建议上传69:28大小的图片,不上传则使用系统默认</div>
	            </div>
	        </div>
	        <div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">加减大师正确按钮图</label>
	            <div class="col-sm-9 col-xs-12">
	               	{php echo tpl_form_field_image('face[gRight]',$settings['face']['gRight']);}
	               	<div class="help-block">建议上传1:1大小的图片,不上传则使用系统默认</div>
	            </div>
	        </div>
	        <div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">加减大师错误按钮图</label>
	            <div class="col-sm-9 col-xs-12">
	               	{php echo tpl_form_field_image('face[gWrong]',$settings['face']['gWrong']);}
	               	<div class="help-block">建议上传1:1大小的图片,不上传则使用系统默认</div>
	            </div>
	        </div>
	        <div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">分享微信图</label>
	            <div class="col-sm-9 col-xs-12">
	               	{php echo tpl_form_field_image('face[share1]',$settings['face']['share1']?$settings['face']['share1']:'../addons/junsion_challeng/public/img/weixinfenxiang.png');}
	               	<div class="help-block">建议上传1:1大小的图片,不上传则使用系统默认</div>
	            </div>
	        </div>
	        <div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">分享微信按钮图</label>
	            <div class="col-sm-9 col-xs-12">
	               	{php echo tpl_form_field_image('face[share2]',$settings['face']['share2']?$settings['face']['share2']:'../addons/junsion_challeng/public/img/fenxiangbg.png');}
	               	<div class="help-block">建议上传364*122大小的图片,不上传则使用系统默认</div>
	            </div>
	        </div>
	        <div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">首页奖品列表底部图</label>
	            <div class="col-sm-9 col-xs-12">
	               	{php echo tpl_form_field_image('face[g_bottom]',$settings['face']['g_bottom']?$settings['face']['g_bottom']:'../addons/junsion_challeng/public/img/xiaoxiong.png');}
	               	<div class="help-block">建议上传1:1大小的图片,不上传则使用系统默认</div>
	            </div>
	        </div>
	        <div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">群内智力转发图</label>
	            <div class="col-sm-9 col-xs-12">
	               	{php echo tpl_form_field_image('face[g_share]',$settings['face']['g_share']?$settings['face']['g_share']:'../addons/junsion_challeng/public/img/paimingfenxiang@3x.png');}
	               	<div class="help-block">建议上传1:1大小的图片,不上传则使用系统默认</div>
	            </div>
	        </div>
	        <div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">挑战倒计时图</label>
	            <div class="col-sm-9 col-xs-12">
	               	{php echo tpl_form_field_image('face[g_time]',$settings['face']['g_time']?$settings['face']['g_time']:'../addons/junsion_challeng/public/img/time.png');}
	               	<div class="help-block">建议上传1:1大小的图片,不上传则使用系统默认</div>
	            </div>
	        </div>
	        <div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">答题分享手势图</label>
	            <div class="col-sm-9 col-xs-12">
	               	{php echo tpl_form_field_image('face[g_shoushi]',$settings['face']['g_shoushi']?$settings['face']['g_shoushi']:'../addons/junsion_challeng/public/img/shoushi.png');}
	               	<div class="help-block">建议上传1:1大小的图片,不上传则使用系统默认</div>
	            </div>
	        </div>
	        <div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">答题失败图</label>
	            <div class="col-sm-9 col-xs-12">
	               	{php echo tpl_form_field_image('face[g_over]',$settings['face']['g_over']?$settings['face']['g_over']:'../addons/junsion_challeng/public/img/tiaozhanshibai.png');}
	               	<div class="help-block">建议上传1:1大小的图片,不上传则使用系统默认</div>
	            </div>
	        </div>
	        <div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">关闭按钮图</label>
	            <div class="col-sm-9 col-xs-12">
	               	{php echo tpl_form_field_image('face[g_close]',$settings['face']['g_close']?$settings['face']['g_close']:'../addons/junsion_challeng/public/img/close.png');}
	               	<div class="help-block">建议上传1:1大小的图片,不上传则使用系统默认</div>
	            </div>
	        </div>
	        <div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">游戏列表提示图</label>
	            <div class="col-sm-9 col-xs-12">
	               	{php echo tpl_form_field_image('face[rarrow]',$settings['face']['rarrow']?$settings['face']['rarrow']:'../addons/junsion_challeng/public/img/rarrow.png');}
	               	<div class="help-block">建议上传1:1大小的图片,不上传则使用系统默认</div>
	            </div>
	        </div>
	        <div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">游戏列表提示图</label>
	            <div class="col-sm-9 col-xs-12">
	               	{php echo tpl_form_field_image('face[liulan]',$settings['face']['liulan']?$settings['face']['liulan']:'../addons/junsion_challeng/public/img/eye.png');}
	               	<div class="help-block">建议上传1:1大小的图片,不上传则使用系统默认</div>
	            </div>
	        </div>
	        <div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">用户中心背景图</label>
	            <div class="col-sm-9 col-xs-12">
	               	{php echo tpl_form_field_image('face[u_bg]',$settings['face']['u_bg']?$settings['face']['u_bg']:'../addons/junsion_challeng/public/img/jiangpinbeijing.png');}
	               	<div class="help-block">建议上传1:1大小的图片,不上传则使用系统默认</div>
	            </div>
	        </div>
	        <div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">猜歌达人音乐播放背景图</label>
	            <div class="col-sm-9 col-xs-12">
	               	{php echo tpl_form_field_image('face[m_bg]',$settings['face']['m_bg']?$settings['face']['m_bg']:'../addons/junsion_challeng/public/img/m_bg.png');}
	               	<div class="help-block">建议上传1:1大小的图片,不上传则使用系统默认</div>
	            </div>
	        </div>
	        <div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">猜歌达人音乐播放图</label>
	            <div class="col-sm-9 col-xs-12">
	               	{php echo tpl_form_field_image('face[m_play]',$settings['face']['m_play']?$settings['face']['m_play']:'../addons/junsion_challeng/public/img/play.png');}
	               	<div class="help-block">建议上传1:1大小的图片,不上传则使用系统默认</div>
	            </div>
	        </div>
	        <div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">猜歌达人音乐暂停图</label>
	            <div class="col-sm-9 col-xs-12">
	               	{php echo tpl_form_field_image('face[m_stop]',$settings['face']['m_stop']?$settings['face']['m_stop']:'../addons/junsion_challeng/public/img/stop.png');}
	               	<div class="help-block">建议上传1:1大小的图片,不上传则使用系统默认</div>
	            </div>
	        </div>
		</div>
	</div>
</div>
<div class="settings">
	<div class="panel panel-default">
	 	<div class="panel-heading">颜色设置</div>
	 	<div class="panel-body">
	 		<div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">小程序主题颜色</label>
	            <div class="col-sm-9 col-xs-12">
	            	{php echo tpl_form_field_color('wx_color[project]',$settings['wx_color']['project']?$settings['wx_color']['project']:'#DA593F')}
				</div>
			</div>
	 		<div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">小程序副主题颜色</label>
	            <div class="col-sm-9 col-xs-12">
	            	{php echo tpl_form_field_color('wx_color[project1]',$settings['wx_color']['project1']?$settings['wx_color']['project1']:'#ffe7b1')}
				</div>
			</div>
	 		<div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">首页，奖品页排行榜背景颜色</label>
	            <div class="col-sm-9 col-xs-12">
	            	{php echo tpl_form_field_color('wx_color[r_bg]',$settings['r_bg']['project1']?$settings['r_bg']['project1']:'#fff4de')}
				</div>
			</div>
	 		<div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">首页,奖品页分割线颜色</label>
	            <div class="col-sm-9 col-xs-12">
	            	{php echo tpl_form_field_color('wx_color[line1]',$settings['r_bg']['line1']?$settings['r_bg']['line1']:'#faecd2')}
				</div>
			</div>
	 		<div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">用户中心分割线颜色</label>
	            <div class="col-sm-9 col-xs-12">
	            	{php echo tpl_form_field_color('wx_color[line]',$settings['r_bg']['line']?$settings['r_bg']['line']:'#f5d898')}
				</div>
			</div>
	 		<div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">底部菜单背景颜色</label>
	            <div class="col-sm-9 col-xs-12">
	            	{php echo tpl_form_field_color('wx_color[footer]',$settings['wx_color']['footer']?$settings['wx_color']['footer']:'#D7B872')}
				</div>
			</div>
	 		<div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">字体颜色</label>
	            <div class="col-sm-9 col-xs-12">
	            	{php echo tpl_form_field_color('wx_color[font]',$settings['wx_color']['font']?$settings['wx_color']['font']:'#f8e0ab')}
				</div>
			</div>
	 		<div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">游戏页部分背景颜色</label>
	            <div class="col-sm-9 col-xs-12">
	            	{php echo tpl_form_field_color('wx_color[g_bg]',$settings['wx_color']['g_bg']?$settings['wx_color']['g_bg']:'#f1c747')}
				</div>
			</div>
	 		<div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">答题成功背景颜色</label>
	            <div class="col-sm-9 col-xs-12">
	            	{php echo tpl_form_field_color('wx_color[g_suc]',$settings['wx_color']['g_suc']?$settings['wx_color']['g_suc']:'#46c01b')}
				</div>
			</div>
	 		<div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">答题错误背景颜色</label>
	            <div class="col-sm-9 col-xs-12">
	            	{php echo tpl_form_field_color('wx_color[g_err]',$settings['wx_color']['g_err']?$settings['wx_color']['g_err']:'#ca4242')}
				</div>
			</div>
	 	</div>
	 </div>
</div>	 	

<div class="settings">
	<div class="panel panel-default">
	 	<div class="panel-heading">文字自定义设置</div>
	 	<div class="panel-body">
	 		<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">挑战失败提示语</label>
            	<div class="col-sm-9">
	                <input type="text" class='form-control' name='font[failtxt]' value='{$settings["font"]["failtxt"]}' />
            		<div class="help-block">例如：挑战失败，再接再厉，不填则系统默认</div>
            	</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">挑战成功提示语</label>
            	<div class="col-sm-9">
	                <input type="text" class='form-control' name='font[suctxt]' value='{$settings["font"]["suctxt"]}' />
            	<div class="help-block">例如：挑战成功，恭喜您获得XXX奖品，不填则系统默认</div>
            	</div>
          	</div>
          	<div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">首页协议标题</label>
	            <div class="col-sm-9 col-xs-12">
	                  <input type="text" name="font[agree]" class="form-control"  value="{$settings['font']['agree']}"  />
	                  <div class="help-block">协议标题，如：挑战成功免费送娃娃，不填则系统默认</div>
	            </div>
	        </div>
          	<div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">首页智力榜标题</label>
	            <div class="col-sm-9 col-xs-12">
	                  <input type="text" name="font[IQ]" class="form-control"  value="{$settings['font']['IQ']}"  />
	                  <div class="help-block">智力榜标题，如：智力榜，不填则系统默认</div>
	            </div>
	        </div>
          	<div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">首页智力排行榜标题</label>
	            <div class="col-sm-9 col-xs-12">
	                  <input type="text" name="font[IQ1]" class="form-control"  value="{$settings['font']['IQ1']}"  />
	                  <div class="help-block">智力排行榜标题，如：智力排行榜，不填则系统默认</div>
	            </div>
	        </div>
          	<div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">首页毅力排行榜标题</label>
	            <div class="col-sm-9 col-xs-12">
	                  <input type="text" name="font[will]" class="form-control"  value="{$settings['font']['will']}"  />
	                  <div class="help-block">毅力排行榜标题，如：毅力排行榜，不填则系统默认</div>
	            </div>
	        </div>
          	<div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">首页群内智力栏标题</label>
	            <div class="col-sm-9 col-xs-12">
	                  <input type="text" name="font[qunIQ]" class="form-control"  value="{$settings['font']['qunIQ']}"  />
	                  <div class="help-block">群内智力栏标题，如：群内智力，不填则系统默认</div>
	            </div>
	        </div>
          	<div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">首页群内智力排行榜标题</label>
	            <div class="col-sm-9 col-xs-12">
	                  <input type="text" name="font[qunIQ1]" class="form-control"  value="{$settings['font']['qunIQ1']}"  />
	                  <div class="help-block">群内智力排行榜标题，如：群内智力排行榜，不填则系统默认</div>
	            </div>
	        </div>
          	<div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">首页奖品栏标题</label>
	            <div class="col-sm-9 col-xs-12">
	                  <input type="text" name="font[reward]" class="form-control"  value="{$settings['font']['reward']}"  />
	                  <div class="help-block">奖品栏标题，如：娃娃奖品，不填则系统默认</div>
	            </div>
	        </div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">首页奖品提示语</label>
            	<div class="col-sm-9">
                	<input class='form-control' name='font[tip]' value='{$settings["font"]["tip"]}'>
                	<div class='help-block'>奖品列表提示语，如：挑战成功领娃娃，不填则系统默认</div>
            	</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">首页立即领取按钮文字</label>
            	<div class="col-sm-9">
                	<input class='form-control' name='font[btn]' value='{$settings["font"]["btn"]}'>
                	<div class='help-block'>首页立即领取按钮文字，如：立即领取，不填则系统默认</div>
            	</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">首页协议底部文字</label>
            	<div class="col-sm-9">
                	<input class='form-control' name='font[agree_bot]' value='{$settings["font"]["agree_bot"]}'>
                	<div class='help-block'>首页立即领取按钮文字，如：挑战成功领娃娃，不填则系统默认</div>
            	</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">首页协议立即领取按钮文字</label>
            	<div class="col-sm-9">
                	<input class='form-control' name='font[agree_btn]' value='{$settings["font"]["agree_btn"]}'>
                	<div class='help-block'>首页协议立即领取按钮文字，如：立即领取，不填则系统默认</div>
            	</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">用户页中奖数提示语</label>
            	<div class="col-sm-9">
                	<input class='form-control' name='font[user_tip]' value='{$settings["font"]["user_tip"]}'>
                	<div class='help-block'>用户页中奖数提示语，如：共获得娃娃，不填则系统默认</div>
            	</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">用户中心更多挑战文字</label>
            	<div class="col-sm-9">
                	<input class='form-control' name='font[more_tz]' value='{$settings["font"]["more_tz"]}'>
                	<div class='help-block'>用户中心更多挑战文字，如：更多智力挑战，不填则系统默认</div>
            	</div>
          	</div>
	 	</div>
	 </div>
</div>
<div class="settings">	 	
	<div class="panel panel-default">
		 	<div class="panel-heading">首页广告设置<small style="color:red;">若跳转小程序，请输入appid。若跳转小程序，填小程序页面路径；若跳转网页，请填https链接。</small></div>
		 	<div class="panel-body">
				<span id="selectimage7" class="btn btn-primary"><i class="icon-plus"></i> 上传图片</span>
				<span class="btn btn-default"><i class="icon-plus"></i> 建议上传69:35大小一致的图片</span>
				<div id="listimage7" style="margin-top: 10px;">
				{loop $settings['home_adv'] $p}
					<div class="item">
						<span onclick="$(this).parent().remove()" class="glyphicon glyphicon-remove-circle"></span>
						<img src="{php echo toimage($p['pic'])}">
						<input name="home_picurl[]" value="{$p['pic']}" type="hidden">
						<div>排序：<input placeholder="值越大，越前显示" class="form-control" name="home_sort[]" type="text" value="{$p['sort']}"></div>
						<div>appid：<input placeholder="若跳转小程序，请输入appid" class="form-control" name="home_appid[]" type="text" value="{$p['appid']}"></div>
						<div>链接：<input placeholder="若跳转小程序，填小程序页面路径；若跳转网页，请填https链接" class="form-control" name="home_link[]" type="text" value="{$p['link']}"></div>
					</div>
				{/loop}
				</div>
		     </div>
	<script>     
	require(['jquery', 'util'], function($, util){
		$(function(){
			// 对象绑定点击事件
			$('#selectimage7').click(function(){
				util.uploadMultiPictures(function(list){
					// your code here
					for(var i=0; i<list.length; i++){
						var s = '<div class="item"><span onclick="$(this).parent().remove()" class="glyphicon glyphicon-remove-circle"></span>';
						s += '<img src="'+list[i]['url']+'">';
						s += '<input name="home_picurl[]" type="hidden" value="'+list[i]['filename']+'">';
						s += '<div>排序：<input placeholder="值越大，越前显示" class="form-control" name="home_sort[]" type="number"></div>';
						s += '<div>appid：<input placeholder="若跳转小程序，请输入appid" class="form-control" name="home_appid[]" type="text"></div>';
						s += '<div>链接：<input placeholder="若跳转小程序，填小程序页面路径；若跳转网页，请填https链接" class="form-control" name="home_link[]" type="text"></div>';
						s += '</div>';
						$('#listimage8').append(s);
					}
				});
			});
		});
	});
	</script>	     
	</div>
	<div class="panel panel-default">
		 	<div class="panel-heading">用户中心广告设置<small style="color:red;">若跳转小程序，请输入appid。若跳转小程序，填小程序页面路径；若跳转网页，请填https链接。</small></div>
		 	<div class="panel-body">
				<span id="selectimage8" class="btn btn-primary"><i class="icon-plus"></i> 上传图片</span>
				<span class="btn btn-default"><i class="icon-plus"></i> 建议上传1:1大小一致的图片</span>
				<div id="listimage8" style="margin-top: 10px;">
				{loop $settings['adv'] $p}
					<div class="item">
						<span onclick="$(this).parent().remove()" class="glyphicon glyphicon-remove-circle"></span>
						<img src="{php echo toimage($p['pic'])}">
						<input name="index_picurl[]" value="{$p['pic']}" type="hidden">
						<div>排序：<input placeholder="值越大，越前显示" class="form-control" name="index_sort[]" type="text" value="{$p['sort']}"></div>
						<div>appid：<input placeholder="若跳转小程序，请输入appid" class="form-control" name="index_appid[]" type="text" value="{$p['appid']}"></div>
						<div>链接：<input placeholder="若跳转小程序，填小程序页面路径；若跳转网页，请填https链接" class="form-control" name="index_link[]" type="text" value="{$p['link']}"></div>
						<div>标题：<input placeholder="标题" class="form-control" name="index_title[]" type="text" value="{$p['title']}"></div>
						<div>简述：<input placeholder="简述" class="form-control" name="index_desc[]" type="text" value="{$p['desc']}"></div>
						<div>按钮文字：<input placeholder="按钮文字" class="form-control" name="index_btn[]" type="text" value="{$p['btn']}"></div>
					</div>
				{/loop}
				</div>
		     </div>
	<script>     
	require(['jquery', 'util'], function($, util){
		$(function(){
			// 对象绑定点击事件
			$('#selectimage8').click(function(){
				util.uploadMultiPictures(function(list){
					// your code here
					for(var i=0; i<list.length; i++){
						var s = '<div class="item"><span onclick="$(this).parent().remove()" class="glyphicon glyphicon-remove-circle"></span>';
						s += '<img src="'+list[i]['url']+'">';
						s += '<input name="index_picurl[]" type="hidden" value="'+list[i]['filename']+'">';
						s += '<div>排序：<input placeholder="值越大，越前显示" class="form-control" name="index_sort[]" type="number"></div>';
						s += '<div>appid：<input placeholder="若跳转小程序，请输入appid" class="form-control" name="index_appid[]" type="text"></div>';
						s += '<div>链接：<input placeholder="若跳转小程序，填小程序页面路径；若跳转网页，请填https链接" class="form-control" name="index_link[]" type="text"></div>';
						s += '<div>标题：<input placeholder="标题" class="form-control" name="index_title[]" type="text"></div>';
						s += '<div>简述：<input placeholder="简述" class="form-control" name="index_desc[]" type="text"></div>';
						s += '<div>按钮文字：<input placeholder="按钮文字" class="form-control" name="index_btn[]" type="text"></div>';
						s += '</div>';
						$('#listimage8').append(s);
					}
				});
			});
		});
	});
	</script>	     
	</div>
</div>
<div class="settings">
	<div class="panel panel-info">
		<div class='panel-heading'>购买次数设置 <small>挑战次数将依据次数从小到大排序</small></div>
		<div class="panel-body">
            <div class="form-group">
				<div class="col-sm-12">
					<table class="table">
						<thead>
						<th style="width:60px;"></th>
						<th  style="width:100px;">次数</th>
						<th  style="width:100px;">售价</th>
						<th  style="width:100px;">原价</th>
						<th  style="width:400px;">描述</th>
						<th>操作</th>
						</thead>
						<tbody id="tbody">
							{loop $settings['price'] $c}
							<tr class="price-item">
								<td><a href="javascript:;" class="btn btn-default btn-sm btn-move"><i class="fa fa-arrows"></i></a></td>
								<td><input type="text" class="form-control" name="num[]" value="{$c['num']}" /></td>
								<td><input type="text" class="form-control" name="price[]" value="{$c['price']}" /></td>
								<td><input type="text" class="form-control" name="costprice[]" value="{$c['costprice']}" /></td>
								<td><input type="text" class="form-control" name="des[]" value="{$c['des']}" /></td>
								<td><button type="button" class="btn btn-danger  btn-sm" onclick="removeCard(this)"><i class="fa fa-remove"></i></button>
								</td>
							</tr>
							{/loop}
						</tbody>
						<tbody>
							<tr>
								<td colspan="4"><button type="button" class="btn btn-default  btn-sm" onclick="addCard()"><i class="fa fa-plus"></i> 添加次数</button></td>
							</tr>
					</table>
				</div>
			</div>
        </div>
	</div>
	
<script>
function removeCard(obj){
	$(obj).closest('.price-item').remove();
}
function addCard(){
	var html='<tr class="price-item">';
	html+='<td><a href="javascript:;" class="btn btn-default btn-sm btn-move"><i class="fa fa-arrows"></i></a></td>';
	html+='<td><input type="text" class="form-control" name="num[]" /></td>';
	html+='<td><input type="text" class="form-control" name="price[]" /></td>';
	html+='<td><input type="text" class="form-control" name="costprice[]" /></td>';
	html+='<td><input type="text" class="form-control" name="des[]" /></td>';
	html+='<td><button type="button" class="btn btn-danger  btn-sm" onclick="removeCard(this)"><i class="fa fa-remove"></i></button>';
	html+='</td>';
	html+='</tr>';
	$('#tbody').append(html);
	bindEvents();
}
function bindEvents() {
	require(['jquery.ui'] ,function(){
		$("#tbody").sortable({handle: '.btn-move'});
    });
}
$(function(){
	bindEvents();
});
</script>
</div>
<div class="settings">
<style>
 .news_layout{
	width: 302px;
    border: 1px solid gainsboro;
 }
 .news_layout_item{
    position: relative;
    background: white;
    border-bottom: 1px solid gainsboro;
    min-height: 60px;
    padding: 10px;
 }
 .news_layout_item:last-child{
 	border: 0;
 }
 .news_layout_item p{
    float: left;
    width: 210px;
    margin-right: 10px;
    margin-bottom: 0;
    height: 60px;
 }
 .news_layout_item img{
 	width: 60px;
    height: 60px;
 }
 .news_layout_item_result p{
    float: none;
    width: 100%;
    margin: 0;
    height: auto; 
 }

 .news_layout_item_first{
 	padding: 0;
 }
 .news_layout_item_first p{
     position: absolute;
    bottom: 0;
    width: 100%;
    color: white;
    margin-bottom: 0;
    background: rgba(0,0,0,.5);
    padding: 0 5%;
    min-height: 25px;
	height: auto;
    line-height: initial;
 }
 .news_layout_item_first img{
     width: 100%;
     height: 150px;
 }
 </style>
    <div class="panel panel-default">
	 	<div class="panel-heading">关注信息设置</div>
	 	<div class="panel-body">
	 		<div class="form-group" id="wechats">
			    <label class="col-xs-12 col-sm-3 col-md-2 control-label">关注奖励</label>
			    <div class="col-sm-9 col-xs-12">
			    	<div class='input-group'>
                   		<input type="text" name="guide_num" id="guide_num" value="{$settings['guide_num']}" class="form-control"/>
						<span class='input-group-addon'>次</span>
		            </div>
		            <div class="help-block">需绑定开放平台</div>
	            </div>
			</div>
			{loop $settings['wechat'] $k $wx}
			<div class="form-group goGuide" {if $settings['guide_num'] <= 0}style="display:none;"{/if}>
				<label class="col-xs-12 col-sm-3 col-md-2 control-label"></label>
				<div class="col-sm-9">
					<div class='input-group'>
						<span class='input-group-addon'>选择公众号</span>
						<select name="wechat[{$k}]" class="form-control">
							<option value="0">请选择公众号</option>
							{loop $wechats $w}
							<option value="{$w['uniacid']}" {if $wx['wechat']==$w['uniacid']}selected{/if}>{$w['name']}</option>
							{/loop}
						</select>
						<span class='input-group-addon'>关注链接</span>
						<input type="text" name="link[{$k}]" value="{$wx['link']}" class="form-control"/>
					</div>
				</div>
			</div>
			{/loop}
			<div class="form-group guide_btn" {if $settings['guide_num'] <= 0}style="display:none;"{/if}>
				<label class="col-xs-12 col-sm-3 col-md-2 control-label"></label>
				<a class="btn btn-info btn-sm" onclick="addGuide();" href="javascript:;">添加关注公众号</a>
			</div>
			<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">客服消息推送设置</label>
            	<div class="col-sm-9">
                	进入小程序后台->设置->开发设置 找到消息推送，设置<br> 
                	URL为： {php echo 'https://'.$_SERVER['HTTP_HOST']."/app".substr($this->createMobileUrl('api'),1)}<br> 
                	token和EncodingAESKey 随便填 无程序无关<br>
                	加密方式选择明文 不需加密；数据格式 选择JSON
            	</div>
          	</div>
	 		<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">关注标题</label>
            	<div class="col-sm-9">
                	<input class='form-control' name='guide[title]' value='{$settings["guide"]["title"]}' />
            	</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">关注简述</label>
            	<div class="col-sm-9">
                	<input class='form-control' name='guide[des]' value='{$settings["guide"]["des"]}' />
            	</div>
          	</div>
          	<div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">关注图片</label>
	            <div class="col-sm-9 col-xs-12">
	               	{php echo tpl_form_field_image('guide[logo]',$settings['guide']['logo']);}
	            </div>
	        </div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">关注链接超时失效</label>
            	<div class="col-sm-9">
            		<div class="input-group">
                		<input class='form-control' type="number" min='0' name='outtime' value='{$settings["outtime"]}'>
                		<div class="input-group-addon">秒</div>
                	</div>
                	<div class="help-block">设置后超时时间后，自动给活动中的关注链接功能，加上超时功能；不填或者0代表不开启超时失效功能</div>
            	</div>
          	</div>
          	<div class="form-group">
            	<label class="col-xs-12 col-sm-3 col-md-2 control-label">超时后跳转链接</label>
            	<div class="col-sm-9">
                	<input class='form-control' name='outurl' value='{$settings["outurl"]}'>
                	<div class='help-block'>开启超时失效功能后，若超时了跳转的链接地址</div>
            	</div>
          	</div>
          	<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">自然关注回复</label>
				<div class="col-sm-9">
                	<textarea class='form-control' name='reply'>{$settings["reply"]}</textarea>
                	<div class='help-block'>当粉丝不是从活动中关注，而是自然关注时的自动回复文字</div>
				</div>
			</div>
			<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">回复消息类型</label>
				<div class="col-sm-9">
					<label><input type="radio" name="type" {if empty($settings['type'])}checked="checked"{/if} value="0"> 图片</label>
					<label style="margin-left: 10px;"><input type="radio" name="type" {if $settings['type']}checked="checked"{/if} value="1"> 图文</label>
					<div class='help-block'>开启了关注奖励才需要，粉丝参与活动关注公众号后，回复的内容</div>
				</div>
			</div>
			<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">推送图片</label>
				<div class="col-sm-9">
					{php echo tpl_form_field_image('imgs',$settings['imgs']);}
				</div>
			</div>
			<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">图文推送</label>
				<div class="col-sm-9">
					<div class='news_layout'>
						<div class='news_layout_item news_layout_item_first'>
							<p>{if $news[0]['txt']}{$news[0]['txt']}{else}点击设置第1条图文(必须设置){/if}</p>
							<img src='{$news[0]["img"]}'>
						</div>
						<div class='news_layout_item news_layout_item_other'>
							<p>{if $news[1]['txt']}{$news[1]['txt']}{else}点击设置第2条图文<br>(不设置则不显示){/if}</p>
							<img src='{$news[1]["img"]}'>
						</div>
						<div class='news_layout_item news_layout_item_other'>
							<p>{if $news[2]['txt']}{$news[2]['txt']}{else}点击设置第3条图文<br>(不设置则不显示){/if}</p>
							<img src='{$news[2]["img"]}'>
						</div>
						<div class='news_layout_item news_layout_item_other'>
							<p>{if $news[3]['txt']}{$news[3]['txt']}{else}点击设置第4条图文<br>(不设置则不显示){/if}</p>
							<img src='{$news[3]["img"]}'>
						</div>
						<div class='news_layout_item news_layout_item_other'>
							<p>{if $news[4]['txt']}{$news[4]['txt']}{else}点击设置第5条图文<br>(不设置则不显示){/if}</p>
							<img src='{$news[4]["img"]}'>
						</div>
						<div class='news_layout_item news_layout_item_other'>
							<p>{if $news[5]['txt']}{$news[5]['txt']}{else}点击设置第6条图文<br>(不设置则不显示){/if}</p>
							<img src='{$news[5]["img"]}'>
						</div>
						<div class='news_layout_item news_layout_item_other'>
							<p>{if $news[6]['txt']}{$news[6]['txt']}{else}点击设置第7条图文<br>(不设置则不显示){/if}</p>
							<img src='{$news[6]["img"]}'>
						</div>
						<div class='news_layout_item news_layout_item_other'>
							<p>{if $news[7]['txt']}{$news[7]['txt']}{else}点击设置第8条图文<br>(不设置则不显示){/if}</p>
							<img src='{$news[7]["img"]}'>
						</div>
					</div>
				</div>	
			</div>
			<input type="hidden" name="news" id="news" value='{$settings['news']}'>
		</div>
	</div>
</div>
<div class="settings">
	<div class="panel panel-default">
		<div class="panel-heading">微信支付参数</div>
		<div class="panel-body">
	        <div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">小程序支付商户号</label>
	            <div class="col-sm-9 col-xs-12">
	                  <input type="text" name="mchid" class="form-control"  value="{$settings['mchid']}"  />
	            </div>
	        </div>
	        <div class="form-group">
	            <label class="col-xs-12 col-sm-3 col-md-2 control-label">小程序支付秘钥</label>
	            <div class="col-sm-9 col-xs-12">
	                  <input type="text" name="APPKEY" class="form-control"  value="{$settings['APPKEY']}"  />
	            </div>
	        </div>
		</div>
	</div>
</div>
<div class="settings">
	<div class="panel panel-default">
		<div class="panel-heading">用户协议</div>
		<div class="panel-body">
	        <div class="form-group">
			    <label class="col-xs-12 col-sm-3 col-md-2 control-label">用户协议</label>
			    <div class="col-sm-9 col-xs-12" >
			    	{php echo tpl_ueditor('agreement',$settings['agreement'], array('height'=>360));}
			    </div>
			</div>
		</div>
	</div>          	
</div>
<div id="modal-module-menus-news"  class="modal fade" tabindex="-1" style="z-index: 1021;">
    <div class="modal-dialog" style='width: 520px;'>
        <div class="modal-content">
            <div class="modal-header"><button aria-hidden="true" data-dismiss="modal" class="close" type="button">×</button><h3>图文设置</h3></div>
            <div class="modal-body">
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">图片</label>
                    <div class="col-sm-9" id="newsimg">
                        {php echo tpl_form_field_image('img')}
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">文字</label>
                    <div class="col-sm-9">
                        <input name="word" id="word" class="form-control" placeholder="请设置图文文字">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">链接</label>
                    <div class="col-sm-9">
                        <input name="url" id="url" class="form-control" placeholder="请设置图文链接">
                    </div>
                </div>
                <div class="form-group" style="text-align: center;margin-top: 20px;">
                    <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                    <button type="button" onclick="onSure()" value="1" name="submit" class="btn btn-primary">确定</button>
                </div>
            </div>
        </div>
    </div>
</div>
<div class='settings'>
	{template 'poster'}
</div>
<div class="settings">
	<div class="panel panel-default set_div">
	 	<div class="panel-heading">Redis设置</div>	
		<div class="panel-body">
	 		<div class="form-group">
	           <label class="col-xs-12 col-sm-3 col-md-2 control-label"> redis功能</label>
	           <div class="col-sm-9 col-xs-12">
					<label><input type="radio" id='redis' name="redis[switch]" value="0" checked> 关闭</label>
					<label style="margin-left: 10px;"><input onclick='checkRedis()' type="radio" name="redis[switch]" value="1" {if $settings['redis']['switch']==1}checked{/if}> 开启</label>
					<div class='help-block'>开启前，请确保你的服务器已安装redis，php已配置好;最好活动从一而终的开启，不要中途切换</div>
				</div>
			</div>
			<div class="form-group">
	           	<label class="col-xs-12 col-sm-3 col-md-2 control-label">redis地址</label>
	           	<div class="col-sm-9">
	               	<input class='form-control' name='redis[ip]' value='{$settings['redis']["ip"]}'>
	               	<div class='help-block'>redis的地址，若是云redis，则填写实例ID，若是本地则填写 127.0.0.1</div>
	           	</div>
	         	</div>
	         	<div class="form-group">
	           	<label class="col-xs-12 col-sm-3 col-md-2 control-label">redis密码</label>
	           	<div class="col-sm-9">
	               	<input class='form-control' name='redis[passwd]' value='{$settings['redis']["passwd"]}'>
	               	<div class='help-block'>redis的密码，如果没设置密码，则为空</div>
	           	</div>
	         	</div>
	         	<div class="form-group">
	           	<label class="col-xs-12 col-sm-3 col-md-2 control-label">redis端口</label>
	           	<div class="col-sm-9">
	               	<input class='form-control' name='redis[port]' value='{$settings['redis']["port"]}'>
	               	<div class='help-block'>默认为：6379</div>
	           	</div>
	         	</div>
	     </div>
	</div>
</div>	
<input name="submit" type="submit" id="submit_info" value="提交" class="btn btn-primary span3" />
<input type="hidden" name="token" value="{$_W['token']}" />
</form>
<script>
function checkRedis(){
	$.ajax({
		url:"{php echo $this->createWebUrl('redis')}",
		success:function(res){
			if(res == -1){
				alert('你服务器未安装redis，不能开启');
				$('#redis').prop('checked');
			}
		}
	});
}
var done = 0;
function check(){
	if($('#redis2').prop('checked') && done == 0){
		$.ajax({
			url:"{php echo $this->createWebUrl('redis',array('op'=>'1'))}",
			data:{rip:$('#rip').val(),rpasswd:$('#rpasswd').val(),rport:$('#rport').val()},
			success:function(res){
				if(res == 1){
					done = 1;
					$('#submit_info').click();
				}else{
					alert('redis连接失败，请检查设置');
					$('#redis').prop('checked');
				}
			}
		});
		return false;
	}
	return true;
}
</script>	
<script>
{if $news}
var news = JSON.parse('{$settings["news"]}');
{else}
var news = new Array();
{/if}
var index = 0;
$('.news_layout_item').click(function(){
	index = $(this).index();
	if(news[index]){
		//if(index == 1) return;
		$('#newsimg input').val(news[index]['img']);
		$('#newsimg img').attr('src',news[index]['img']);
		$('#word').val(news[index]['txt']);
		$('#url').val(news[index]['url']);
	}else{
		//if(index == 1) return;
		$('#newsimg input').val('');
		$('#newsimg img').attr('src','');
		$('#word').val('');
		$('#url').val('');
	}
	$('#modal-module-menus-news').modal();
});
function onSure(){
	news[index] = {img:$('#newsimg input').val(),txt:$('#word').val(),url:$('#url').val()};
	$('#news').val(JSON.stringify(news));
	$('.news_layout_item').eq(index).find('img').attr('src',$('#newsimg img').attr('src'));
	$('.news_layout_item').eq(index).find('p').text(news[index]['txt']);
	$('#modal-module-menus-news').modal('hide');
}
var wechats = '{$wechats1}';
wechats = JSON.parse(wechats);
var n = $('.goGuide').length;
function addGuide(){
	var html = '';
	var sel = '';
	for (var i in wechats){
		sel += '<option value="'+wechats[i].uniacid+'">'+wechats[i].name+'</option>';
	}
	html += '<div class="form-group goGuide">';
	html += '<label class="col-xs-12 col-sm-3 col-md-2 control-label"></label>';
	html += '<div class="col-sm-9">';
	html += '<div class="input-group">';
	html += '<span class="input-group-addon">选择公众号</span>';
	html += '<select name="wechat['+n+']" class="form-control">';
	html += '<option value="0">请选择公众号</option>';
	html += sel;
	html += '</select>';
	html += '<span class="input-group-addon">关注链接</span>';
	html += '<input type="text" name="link['+n+']" class="form-control"/>';
	html += '</div>';
	html += '</div>';
	html += '</div>';
	
	$('#wechats').after(html);
	n++;
}
$(function(){
	$('#guide_num').keyup(function(){
		var val = $(this).val();
		if(val>0){
			$('.goGuide').show();
			$('.guide_btn').show();
		}	
		else{
			$('.goGuide').hide();
			$('.guide_btn').hide();
		}
	})
})
</script>
{template 'common/footer'}
